﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wjtour.BLL;

namespace Wjtour.Web.Admin
{
    public partial class left : BasePage
    {
        protected List<Wjtour.Domain.menu> parentMenus = new List<Wjtour.Domain.menu>();

        protected void Page_Load(object sender, EventArgs e)
        {
            parentMenus = Menus.Where(m => m.parent_id == 0 && m.hide == 0).OrderBy(m => m.listorder).ToList();
        }

        protected List<Wjtour.Domain.menu> getChilds(int parent_id)
        {
            return Menus.Where(m => m.parent_id == parent_id && m.hide == 0).OrderBy(m => m.listorder).OrderBy(m => m.sort).ToList();
        }
    }
}